package com.ghck.server.model.request;

import org.apache.commons.lang3.ArrayUtils;

public enum PatientEventCategory {
	UNKNOW("未知",0),
	BLOOD_OXYGEN("血氧",1),
	BLOOD_PRESSURE("血压",2),
	BLOOD_SUGAR("血糖",3),
	TEMPERATURE("体温",4),
	HEART_RATE("心率",5),
	BODY_AGE("身体年龄",6);
	
	private String description;
	private Integer value;
	
	private PatientEventCategory(String description, Integer value) {
		this.description = description;
		this.value = value;
	}
	public String getDescription() {
		return description;
	}
	public void setDescription(String description) {
		this.description = description;
	}
	public Integer getValue() {
		return value;
	}
	public void setValue(Integer value) {
		this.value = value;
	}
	
	public static PatientEventCategory getPatientEventCategoryByValue(int value){
		if(ArrayUtils.isNotEmpty(PatientEventCategory.values())){
			for (PatientEventCategory iterable_element : PatientEventCategory.values()) {
				if(value==iterable_element.getValue()){
					return iterable_element;
				}
			}
		}
		return null;
	}
	
	
}
